#!/bin/sh

hosts="47.104.26.62"

for host in $hosts; do
login=root@$host
#ssh-copy-id -i ~/.ssh/id_rsa.pub $login
#ssh $login "ssh-keygen; cat ~/.ssh/id_rsa.pub"

#ssh -t $login "bash" < new_host_packages_install.sh
#ssh $login "mkdir -p /srv/bora_deploy/scripts"
#scp ../deploy_service.py $login:/srv/bora_deploy
#scp deploy_bora_bin.sh $login:/srv/bora_deploy/scripts
# 注意：为使用自动化部署能正常运作，请确认 gitee 上的 Depolyed keys setting 是否已将本机的公钥加至其中
scp ../conf.d/supervisord/bora.conf $login:/etc/supervisor/conf.d
ssh $login "supervisorctl reload"
ssh $login "echo '59 23 * * * cd /srv/bora_deploy/bora_bin && ./db_bak.sh' >> /var/spool/cron/crontabs/root"
done

